﻿@{
    ViewBag.Title = "Sua";
    Layout = "~/Views/Shared/Admin/_AdminLayout.cshtml";
}

@using(Html.BeginForm())
{
<div style="background: #fff; text-align: right; height: 40px; width: 100%; border: 1px solid #ccc;">
    <span style="font-size: 18px; font-weight: bold; float: left; padding-top: 17px;padding-left: 15px;">
        THÊM PHÂN QUYỀN</span>
    <table style="float: right; font-size: 11px; color: #262626;">
        <tr>
            <td class="control">
                <input type="submit" class="large button green input" value="Lưu">
            </td>
            <td class="control">
                <a href="~/AdminUser/PhanQuyen" class="large button black input">Đóng</a>
            </td>

        </tr>
    </table>
</div>
<div class="Main_nhap" style="">
    <div class="Main_nhap_left">
        <div style="padding-top: 10px;">
            <div style="border: 1px solid #ccc; background: #e7e7e7; width: 99%; padding: 8px; min-height: 200px; text-shadow: #fff 0px 1px 0px;">
                    <table class="Conten_main_sanpham" cellpadding="0" style="border: 1px solid #fff;">
                            <tr class="row">
                                <td class="box_title">Tên phân quyền</td>
                                <td class="box_object">
                                    <input type="hidden" name="txtId" value=""/>
                                    <input type="text" value="" class = "input_text" style = "width:300px" name="txtTen"/>
                                </td>
                            </tr>
                             <tr class="row">
                                 <td class="box_title">Chức năng</td>
                                <td class="box_object">
                                                <div style="height:300px;overflow-y:scroll;">
                                                @{
                                                List<BabyToys.Models.AssignedPermission> chucnangs = ViewBag.Permissions;
                                                foreach (var chucnang in chucnangs)
                                                {
                                                        <input type="checkbox" 
                                                               name="selectedCourses" 
                                                               value="@chucnang.IdChucNang" 
                                                               @(Html.Raw(chucnang.Assigned ? "checked=\"checked\"" : "")) /> 
                                                        @chucnang.IdChucNang @:  @chucnang.TenChucNang
                                                        @:<br />
                                                }
                                           
                                            }
                                            </div>   
                                </td>
                            </tr>
                </table>
            </div>
        </div> 
    </div>
</div>
}